import service from ".";

const peiJianApi = {
    insert(peiJian) {
        return service.post('/admin/peiJian', peiJian);
    },
    delete(partId) {
        return service.delete(`/admin/peiJian/${partId}`);
    },
    update(peiJian) {
        return service.put('/admin/peiJian', peiJian);
    },
    selectAll() {
        return service.get('/admin/peiJian');
    },
    selectById(partId) {
        return service.get(`/admin/peiJian/${partId}`);
    },
    selectByPage(pageNum, searchCondition) {
        return service.get('/admin/peiJian', {
            params: {
                pageNum,
                partName: searchCondition.partName? searchCondition.partName : '',
                partCode: searchCondition.partCode? searchCondition.partCode : ''
            }
        });
    },


};

export default peiJianApi;